<!-- 退款审核页面 -->
<include file="Common:header" />
<TYimport plugin='datepicker' />
<TYimport plugin='Ueditor,swfUpload' public="true"/>
<div class="table_content" >
    <form action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}" id="upForm" method="post"  class="ajax_form">
        <table class="edit_table">
            <input name="id" type="hidden" value="{$info.order_id}">
        	<input name="ordersn" type="hidden" value="{$info.ordersn}">
        	<tr>
                <td class="tablehead" colspan="2" style="text-align: center;">申請退款詳情</td>
            </tr>
            <tr>
                <td class="tablehead">訂單號</td>
                <td>
                    {$info.ordersn}<label class="tips"></label>
                </td>
            </tr>
            <tr>
                <td class="tablehead">訂單狀態</td>
                <td>
                    <span style="color:#ff8800">
                	<switch name="info['status']">
                            <case value="-1">退款審核中</case>
                            <case value="-2">退款審核成功</case>
							<default>非法订单
					</switch>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="tablehead">清洗狀態</td>
                <td>
					<switch name="info['wash_status']">
						    <case value="0">未安排</case>
						    <case value="1">清洗中</case>
						    <case value="2">已完成</case>
					</switch>
                </td>
            </tr>
            <tr>
                <td class="tablehead">退款金額</td>
                <td>
					<if condition="$info.coupon_id neq null">
                    	￥{$info.real_price}
                    <else/>
                    	￥{$info.price}
                    </if>
                </td>
            </tr>
            <tr>
				<td class="tablehead">下單時間</td>
				<td>{$info.create_time|date="Y-m-d H:i:s",###}</td>
            </tr>
        </table>
        <div class="tab_box_btn">
            <input type="button" class="save_btn" value="審核"/>
            <input type="button" class="back_btn" value="取消"/>
        </div>
    </form>
</div>
<script type="text/javascript">


$(".save_btn").click(function(){
    var id = $('input[name=id]').val();
    var formData = {'id':id};
        $.ajax({
            url:"{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/verify_refund')}",
            type: 'POST',
            data : formData,
            async: false,
            dataType: 'json',
            success:function(data){
                console.dir(data.data);
                if (data.status == 1){
                    var ordersn = $('input[name=ordersn]').val();
                    var refund_url = "/Orders/app_refund/ordersn/"+ordersn;
	    			callBackTips(data.status, data.info,refund_url); //跳转到申请退款页面
	    		}else{
	    			callBackTips(data.status, data.info);
	    		}
			}
		});
});
</script>
<include file="Common:footer" />
